﻿// This File is part of Innovation Foundry's "QualityHelper Project"
//
// Copyright  2008 Innovation Foundry Pty Ltd
// All rights reserved

// This work is free software; you can redistribute it and/or modify 
// it under the terms of the GNU General Public License as published 
// by the Free Software Foundation; either version 3 of the License, 
// or any later version. This work is distributed in the hope that 
// it will be useful, but WITHOUT ANY WARRANTY; without even the 
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
// PURPOSE. 
// See version 3 of the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this work; if not, write to the
// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA  02110-1301 USA
// or alternatively it may be downloaded from <http://www.gnu.org/licenses/>.
	

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using InnovationFoundry.Utilities.Files;

namespace InnovationFoundry.QualityHelper.Web.Pages
{
    public partial class QualityHelper : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            txtID.Text = Guid.NewGuid().ToString();
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            //if (fileUpload.FileBytes.Length > 0)
            //    FileWriter.DoSaveOnly(new Guid(txtID.Text), FileTools.GetFileNameWithoutExtension(fileUpload.FileName), fileUpload.FileBytes, fileUpload.PostedFile.ContentType, FileTools.GetFileExtension(fileUpload.FileName));
            //literal.Text += "<br/><br/><br/>OK " + Request.Url.AbsoluteUri.Substring(0,Request.Url.AbsoluteUri.LastIndexOf("/") + 1) + "FileReader.axd?FileID=" + txtID.Text;
        }
    }
}
